package com.paipai.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("woniu-service-login")
public interface UserFeign {
    @RequestMapping("/user/login")
    public Map<String,String> login(@RequestParam(value = "name") String name, @RequestParam(value = "password") String password);

    @RequestMapping("/user/register")
    public String register(@RequestParam("username") String username,@RequestParam("password") String password,@RequestParam("tel") String tel,@RequestParam("emailCode") String emailCode,@RequestParam("email") String email);

    @RequestMapping("/user/sendEmail")
    String sendEmail(@RequestParam("email") String email);

    @RequestMapping("/user/getUserByName")
    String getUserByName();
}
